<script type="text/ng-template" id="modals/galleryCreateNew">
  <div class="modal-header">
    <h3>
      <span ng-if="isUploadModal">Upload Exploration</span>
      <span ng-if="!isUploadModal">Add New Exploration</span>
    </h3>
  </div>

  <div class="modal-body">
    <div ng-if="isUploadModal">
      <em>
        This form allows you to upload the YAML file corresponding to an exploration. Currently, you will need to upload any associated image files separately in the relevant states.
      </em>
    </div>

    <br>

    <form role="form" class="form-horizontal">
      <fieldset>
        <div class="form-group" ng-class="{'has-error': !newExplorationTitle}">
          <label for="newExplorationTitle" class="col-lg-2 col-md-2 col-sm-2">
            Title
          </label>
          <div class="col-lg-10 col-md-10 col-sm-10">
            <input id="newExplorationTitle" type="text" class="form-control" ng-model="newExplorationTitle" name="newExplorationTitle" autofocus required>
          </div>
        </div>

        <div class="form-group" ng-class="{'has-error': !newExplorationCategory}">
          <label for="newExplorationCategory" class="col-lg-2 col-md-2 col-sm-2">
            Category
          </label>
          <div class="col-lg-10 col-md-10 col-sm-10">
            <select2-dropdown item="newExplorationCategory" choices="categoriesForDropdown" placeholder="Select a category, or enter a new one" new-choice-regex="^[A-Z a-z]+$" width="300px">
            </select2-dropdown>
          </div>
        </div>

        <div ng-if="isUploadModal" class="form-group">
          <label for="newFileInput" class="col-lg-2 col-md-2 col-sm-2">
            Upload YAML file
          </label>
          <div class="col-lg-10 col-md-10 col-sm-10">
            <input id="newFileInput" type="file">
          </div>
        </div>
      </fieldset>
    </form>
  </div>
  <div class="modal-footer">
    <button class="btn btn-success" type="submit" ng-click="save(newExplorationTitle, newExplorationCategory)" ng-disabled="!newExplorationTitle || !newExplorationCategory">Save</button>
    <button class="btn btn-default" ng-click="cancel()">Cancel</button>
  </div>
</script>